import React from 'react'
import {NavBar} from 'antd-mobile' 
import {
  Form,
  Input,
  Button,
} from 'antd-mobile'
function App() { 
  const [form]=Form.useForm()
  const onFinish=()=>{
    form.validateTrigger()
  }
  return (
    <div>
      <NavBar>新增乘客</NavBar>
      <div>
        <Button>扫描添加</Button>
       <Form
       form={form}
       onFinish={onFinish}
        layout='horizontal'
        footer={
          <Button block type='submit' color='primary' size='large'>
            提交
          </Button>
        }
      >
        <Form.Header>添加乘车人</Form.Header>
        <Form.Item
          name='name'
          label='姓名'
          rules={[{ required: true, message: '姓名不能为空' }]}
        >
          <Input placeholder='请输入姓名' />
        </Form.Item>
         <Form.Item
          name='card'
          label='身份证'
          rules={[{ required: true, message: '身份证不能为空' }]}
        >
          <Input placeholder='请输入身份证' />
        </Form.Item>
        </Form>
      </div>
    </div>
  )
}

export default App